package com.lifesting.tool.j2as3.action;

import java.io.PrintWriter;

import org.eclipse.ui.console.MessageConsoleStream;

import com.lifesting.tool.j2as3.impose.ILogger;

public class ConsoleLogger implements ILogger {

	private MessageConsoleStream stream;
	
	public ConsoleLogger(MessageConsoleStream stream) {
		super();
		this.stream = stream;
	}

	@Override
	public void log(String message) {
		stream.println(message);
	}

	@Override
	public void log(Exception e) {
		e.printStackTrace(new PrintWriter(stream,true));
	}

}
